#ifndef WXSCODERCONTEXT_H
#define WXSCODERCONTEXT_H

#include <wx/string.h>
#include <wx/arrstr.h>
#include <wx/hashmap.h>
#include <wx/hashset.h>
#include "../wxscodinglang.h"


struct wxsCoderContext {
  WX_DECLARE_STRING_HASH_MAP( wxString, ExtraMap );
  WX_DECLARE_HASH_SET( wxString, wxStringHash, wxStringEqual, wxStringSet );

  wxsCodingLang m_Language;               ///< \brief Language in which code should be generated
  long          m_Flags;                  ///< \brief Flags used to generate code
  wxString      m_WindowParent;
  wxStringSet m_LocalHeaders;             ///< \brief List of headers included inside .cpp file which are included inside pch file
  wxStringSet m_LocalHeadersNonPCH;       ///< \brief List of headers included inside .cpp file which are not included in pch file
  wxStringSet m_GlobalHeaders;            ///< \brief List of headers containing declarations of resource's items included inside pch file
  wxStringSet m_GlobalHeadersNonPCH;      ///< \brief List of headers containing declarations of resource's items not included inside pch file
  wxStringSet m_ForwardDeclarations;      ///< \brief List of forward declarations of resource's items
  wxStringSet m_ForwardDeclarationsNonPCH;///< \brief List of forward declarations of resource's items
  wxStringSet m_LocalDeclarations;        ///< \brief List of declarations of local items (not visible in resource's class)
  wxStringSet m_GlobalDeclarations;       ///< \brief List of declarations of global items (which are being members of resource's class)
  wxArrayString m_IdEnumerations;         ///< \brief Code used to create list of identifiers as members of resource class
  wxArrayString m_IdInitializions;        ///< \brief Code used to initialize list of identifiers
  wxString    m_XRCFetchingCode;          ///< \brief Code which will fetch items from XRC file after it's loaded (through querying with IDs)
  wxString    m_BuildingCode;             ///< \brief Code which builds resource's items manually (when not using XRC file)
  wxString    m_EventsConnectingCode;
  ExtraMap      m_Extra;

  void AddHeader( const wxString& Header, const wxString& DeclaredClass, long HeaderFlags = 0 );


  void AddDeclaration( const wxString& Declaration );


  void AddXRCFetchingCode( const wxString& Code );


  void AddBuildingCode( const wxString& Code );


  void AddEventCode( const wxString& Code );


  void AddIdCode( const wxString& Enumeration, const wxString& Initialization );


  wxString GetUniqueName( const wxString& Prefix );
};

#endif
